Sound may be distorted when overamplifying. It is therefore
useful to make it easier for users to select exactly 100%
when allow-volume-above-100-percent is enabled, as that is
the highest non-distorted value.
Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/7279
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4004>
_amplifySettingsChanged() {
this._allowAmplified = this._soundSettings.get_boolean(ALLOW_AMPLIFIED_VOLUME_KEY);
- this.slider.maximum_value = this._allowAmplified
+ const maxLevel = this._allowAmplified
? this.getMaxLevel() : 1;
+ this.slider.maximum_value = maxLevel;
+
+ this.slider.clearMarks();
+ if (this._allowAmplified)
+ this.slider.addMark(1);
if (this._stream)
this._updateVolume();